Skip to content

Commit 7df51b7

Browse files
committed
refactor: Drop residual unused vars and SuppressWarnings
Cleans up two leftovers from the SonarQube pass: an unused Boolean binding in SchemaParser.parseAdditionalProperties (the false branch doesn't need the value) and a no-longer-needed @SuppressWarnings on Spec.resolveParameterOrParse.
1 parent 51604e4 commit 7df51b7

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

src/main/java/com/retailsvc/http/spec/Spec.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ private static Operation parseOperation(
151151
return new Operation(opId, method, path, body, params, responses);
152152
}
153153

154-
@SuppressWarnings("unchecked")
155154
private static Parameter resolveParameterOrParse(
156155
Map<String, Object> raw, Map<String, Parameter> componentParameters) {
157156
String ref = (String) raw.get("$ref");

src/main/java/com/retailsvc/http/spec/schema/SchemaParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ private static AdditionalProperties parseAdditionalProperties(Object value) {
126126
return switch (value) {
127127
case null -> new AdditionalProperties.Allowed();
128128
case Boolean b when b -> new AdditionalProperties.Allowed();
129-
case Boolean b -> new AdditionalProperties.Forbidden();
129+
case Boolean _ -> new AdditionalProperties.Forbidden();
130130
default -> new AdditionalProperties.SchemaConstraint(parse((Map<String, Object>) value));
131131
};
132132
}

0 commit comments

Comments
 (0)