Skip to content

Commit

Permalink
fix: correct failing tests and PMD errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
credmond-git committed Mar 15, 2024
1 parent 5f60138 commit f96f218
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ public GestaltBuilder setTreatMissingDiscretionaryValuesAsErrors(boolean treatMi
* @param treatNullValuesInClassAsErrors treat null values in classes after decoding as errors
* @return GestaltBuilder builder
* @deprecated This value is no longer used, Please use {@link #setTreatMissingDiscretionaryValuesAsErrors(boolean)}
* and {@link #setTreatMissingValuesAsErrors(Boolean)}
* and {@link #setTreatMissingValuesAsErrors(Boolean)}
*/
@Deprecated(since = "0.25.0", forRemoval = true)
public GestaltBuilder setTreatNullValuesInClassAsErrors(Boolean treatNullValuesInClassAsErrors) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,10 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl
//noinspection DataFlowIssue assigning null for ease of reading here
gestaltResult = null;
}
} else
} else {
throw new GestaltException("Failed to get pass through object from proxy config while calling method: " + methodName +
" with type: " + returnType + " in path: " + path + ".");
}
}

return gestaltResult;
Expand Down Expand Up @@ -301,7 +302,8 @@ static class ProxyCacheInvocationHandler extends ProxyPassThroughInvocationHandl
private final Map<String, Object> methodResults;


private ProxyCacheInvocationHandler(String path, Tags tags, DecoderContext decoderContext, GestaltConfig config, Map<String, Object> methodResults) {
private ProxyCacheInvocationHandler(String path, Tags tags, DecoderContext decoderContext, GestaltConfig config,
Map<String, Object> methodResults) {
super(path, tags, decoderContext, config);
this.methodResults = methodResults;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,6 @@ public OptionalMissingValueDecoding(String path, ConfigNode node, String decoder
public String description() {
StringBuilder description = new StringBuilder(62);
description.append("Missing Optional Value while decoding ").append(decoder).append(" on path: ").append(path);
if (node != null) {
description.append(", from node: ").append(node.printer(path));
}
if (className != null) {
description.append(", with class: ").append(className);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public static Class<?> wrapperToPrimitive(final Class<?> cls) {
*
* @param type The class to query or null.
* @return true if the given {@code type} is a primitive or primitive wrapper ({@link Boolean}, {@link Byte},
* {@link Character}, {@link Short}, {@link Integer}, {@link Long}, {@link Double}, {@link Float}).
* {@link Character}, {@link Short}, {@link Integer}, {@link Long}, {@link Double}, {@link Float}).
* @since 3.1
*/
public static boolean isPrimitiveOrWrapper(final Class<?> type) {
Expand All @@ -267,7 +267,7 @@ public static boolean isPrimitiveOrWrapper(final Class<?> type) {
*
* @param type The class to query or null.
* @return true if the given {@code type} is a primitive wrapper ({@link Boolean}, {@link Byte}, {@link Character},
* {@link Short}, {@link Integer}, {@link Long}, {@link Double}, {@link Float}).
* {@link Short}, {@link Integer}, {@link Long}, {@link Double}, {@link Float}).
* @since 3.1
*/
public static boolean isPrimitiveWrapper(final Class<?> type) {
Expand Down

0 comments on commit f96f218

Please sign in to comment.