Skip to content

Commit

Permalink
fix: PMD issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
credmond-git committed Dec 15, 2023
1 parent bc9cdbf commit a7bdd12
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import org.github.gestalt.config.entity.GestaltConfig;
import org.github.gestalt.config.entity.ValidationError;
import org.github.gestalt.config.exceptions.GestaltException;
import org.github.gestalt.config.loader.ConfigLoaderRegistry;
import org.github.gestalt.config.node.ConfigNode;
import org.github.gestalt.config.node.LeafNode;
import org.github.gestalt.config.node.MapNode;
Expand Down Expand Up @@ -35,7 +34,7 @@ public final class ProxyDecoder implements Decoder<Object> {
private ProxyDecoderMode proxyDecoderMode = ProxyDecoderMode.CACHE;


private static String getConfigName(String methodName, Type returnType) {
private static String getConfigNameFromMethod(String methodName, Type returnType) {
String name = methodName;
if (methodName.startsWith("get")) {
name = methodName.substring(3);
Expand Down Expand Up @@ -108,7 +107,7 @@ public ValidateOf<Object> decode(String path, Tags tags, ConfigNode node, TypeCa
if (configAnnotation != null && configAnnotation.path() != null && !configAnnotation.path().isEmpty()) {
name = configAnnotation.path();
} else {
name = getConfigName(methodName, returnType);
name = getConfigNameFromMethod(methodName, returnType);
}

String nextPath = PathUtil.pathForKey(path, name);
Expand Down Expand Up @@ -206,7 +205,7 @@ protected Optional<Object> retrieveConfig(Object proxy, Method method, Object[]
if (configAnnotation != null && configAnnotation.path() != null && !configAnnotation.path().isEmpty()) {
name = configAnnotation.path();
} else {
name = getConfigName(methodName, returnType);
name = getConfigNameFromMethod(methodName, returnType);
}

String nextPath = PathUtil.pathForKey(path, name);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.github.gestalt.config.reload;

import java.util.ArrayList;
import java.util.List;
import java.util.WeakHashMap;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import org.github.gestalt.config.path.mapper.StandardPathMapper;
import org.github.gestalt.config.reflect.TypeCapture;
import org.github.gestalt.config.reload.ManualConfigReloadStrategy;
import org.github.gestalt.config.source.MapConfigSource;
import org.github.gestalt.config.source.MapConfigSourceBuilder;
import org.github.gestalt.config.tag.Tags;
import org.github.gestalt.config.test.classes.*;
Expand Down

0 comments on commit a7bdd12

Please sign in to comment.