Skip to content

Commit d59cadc

Browse files
committed
Sonar fixes
1 parent b60f6ed commit d59cadc

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

annotations/src/main/java/com/javadiscord/jdi/core/processor/validator/SlashCommandValidator.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@ public boolean validate(Method method) {
3131
for (Map.Entry<Class<? extends Annotation>, String[]> entry : EXPECTED_PARAM_TYPES_MAP
3232
.entrySet()) {
3333
Class<? extends Annotation> annotationClass = entry.getKey();
34-
if (method.isAnnotationPresent(annotationClass)) {
35-
if (!validateMethodParameters(method, entry.getValue())) {
36-
return false;
37-
}
34+
if (
35+
method.isAnnotationPresent(annotationClass)
36+
&& !validateMethodParameters(method, entry.getValue())
37+
) {
38+
return false;
3839
}
3940
}
4041
return true;

api/src/main/java/com/javadiscord/jdi/internal/api/RateLimit.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ public class RateLimit {
88
private int resetAfter;
99
private boolean globalRateLimit;
1010

11-
public RateLimit() {}
12-
1311
public String getBucket() {
1412
return bucket;
1513
}

0 commit comments

Comments
 (0)