Sonar fixes

* exposing internal objects
* boolean complexity
* names, methods with _
* missing `default` in switch
* lost stack trace
* unnecessary null check before instanceof
* unused parameter

* Fix method name
This commit is contained in:
Gary Russell
2019-05-01 14:13:43 -04:00
committed by Artem Bilan
parent 9780a6c893
commit ebbcb9df48
35 changed files with 128 additions and 102 deletions

View File

@@ -47,7 +47,7 @@ public class CrossOrigin {
}
public String[] getOrigin() {
return this.origin;
return this.origin; // NOSONAR - expose internals
}
public void setAllowedHeaders(String... allowedHeaders) {
@@ -55,7 +55,7 @@ public class CrossOrigin {
}
public String[] getAllowedHeaders() {
return this.allowedHeaders;
return this.allowedHeaders; // NOSONAR - expose internals
}
public void setExposedHeaders(String... exposedHeaders) {
@@ -63,7 +63,7 @@ public class CrossOrigin {
}
public String[] getExposedHeaders() {
return this.exposedHeaders;
return this.exposedHeaders; // NOSONAR - expose internals
}
public void setMethod(RequestMethod... method) {
@@ -71,7 +71,7 @@ public class CrossOrigin {
}
public RequestMethod[] getMethod() {
return this.method;
return this.method; // NOSONAR - expose internals
}
public void setAllowCredentials(Boolean allowCredentials) {

View File

@@ -61,7 +61,7 @@ public class RequestMapping {
}
public String[] getPathPatterns() {
return this.pathPatterns;
return this.pathPatterns; // NOSONAR - expose internals
}
public void setMethods(HttpMethod... supportedMethods) {
@@ -70,7 +70,7 @@ public class RequestMapping {
}
public HttpMethod[] getMethods() {
return this.methods;
return this.methods; // NOSONAR - expose internals
}
public void setParams(String... params) {
@@ -79,7 +79,7 @@ public class RequestMapping {
}
public String[] getParams() {
return this.params;
return this.params; // NOSONAR - expose internals
}
public void setHeaders(String... headers) {
@@ -88,7 +88,7 @@ public class RequestMapping {
}
public String[] getHeaders() {
return this.headers;
return this.headers; // NOSONAR - expose internals
}
public void setConsumes(String... consumes) {
@@ -97,7 +97,7 @@ public class RequestMapping {
}
public String[] getConsumes() {
return this.consumes;
return this.consumes; // NOSONAR - expose internals
}
public void setProduces(String... produces) {
@@ -106,7 +106,7 @@ public class RequestMapping {
}
public String[] getProduces() {
return this.produces;
return this.produces; // NOSONAR - expose internals
}
public RequestMethod[] getRequestMethods() {