Skip to content

Commit

Permalink
Replace a few warn logs with info (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaspj10 authored Nov 6, 2024
1 parent f545df6 commit f041e7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ void checkForMissingDescription(FrankAttribute attribute) {
if(attribute.getDescription() != null) {
return;
}
log.warn("Attribute [{}] lacks description", attribute);
log.info("Attribute [{}] lacks description", attribute);
}

@Override
void checkForMissingDescription(ConfigChild configChild) {
if(configChild.getDescription() != null) {
return;
}
log.warn("Config child [{}] lacks description", configChild);
log.info("Config child [{}] lacks description", configChild);
}

AttributeUse getRoleNameAttributeUse() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ private <T> T searchExcludingImplementedInterfaces(Function<FrankMethodDocletBas
ExecutableElement overriddenExecutableElement = getOverriddenExecutableElement();
// The overriddenExecutableElement can be in a Java interface instead of an ancestor class.
// This is because in Java 8 a Java interface can have default method implementations.
if((overriddenExecutableElement != null) && (! overriddenExecutableElement.getClass().isInterface())) {
if(overriddenExecutableElement != null && !overriddenExecutableElement.getClass().isInterface()) {
FrankMethodDocletBase overriddenMethod = (FrankMethodDocletBase) declaringClass.recursivelyFindFrankMethod(overriddenExecutableElement);
if(overriddenMethod != null) {
return overriddenMethod.searchExcludingImplementedInterfaces(getter);
} else {
if(! warnedMethodsNotInJavaDoc.contains(overriddenExecutableElement)) {
if (!warnedMethodsNotInJavaDoc.contains(overriddenExecutableElement)) {
warnedMethodsNotInJavaDoc.add(overriddenExecutableElement);
// To see this warning, run test FrankMethodOverrideTest.whenPackagePrivateOverriddenByPublicThenOnlyChildMethodConsidered().
log.warn("Class {} inherits method {}, but no annotations or JavaDocs are known because the overridden method is not public.",
log.info("Class {} inherits method {}, but no annotations or JavaDocs are known because the overridden method is not public.",
declaringClass::getName, overriddenExecutableElement::getSimpleName);
}
}
Expand All @@ -106,7 +106,7 @@ private <T> T searchExcludingImplementedInterfaces(Function<FrankMethodDocletBas

abstract ExecutableElement getOverriddenExecutableElement();

private <T> T searchImplementedInterfaces(FrankClass clazz, String methodSignature, Function<FrankMethodDocletBase, T> getter) throws FrankDocException {
private <T> T searchImplementedInterfaces(FrankClass clazz, String methodSignature, Function<FrankMethodDocletBase, T> getter) {
TransitiveImplementedInterfaceBrowser<T> interfaceBrowser = new TransitiveImplementedInterfaceBrowser<>(clazz);
Function<FrankClass, T> classGetter = interfaze -> interfaze.getMethodItemFromSignature(methodSignature, getter);
T result = interfaceBrowser.search(classGetter);
Expand Down

0 comments on commit f041e7f

Please sign in to comment.