Skip to content

Commit d2b8b92

Browse files
committed
Cleanup
1 parent 832352e commit d2b8b92

File tree

60 files changed

+192
-306
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+192
-306
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@
320320
<plugin>
321321
<groupId>org.jacoco</groupId>
322322
<artifactId>jacoco-maven-plugin</artifactId>
323-
<version>0.8.13</version>
323+
<version>0.8.14</version>
324324
</plugin>
325325
</plugins>
326326
</reporting>

src/main/java/ch/ralscha/extdirectspring/annotation/ExtDirectMethodType.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public boolean isValid(String beanAndMethodName, Class<?> clazz, Method method)
6262

6363
for (Annotation[] paramAnnotations : allParameterAnnotations) {
6464
for (Annotation paramAnnotation : paramAnnotations) {
65-
if (RequestParam.class.isInstance(paramAnnotation)) {
65+
if ((paramAnnotation instanceof RequestParam)) {
6666
log.error("SIMPLE method '" + beanAndMethodName
6767
+ "' contains a non supported parameter annotation @RequestParam");
6868
return false;
@@ -189,7 +189,7 @@ public boolean isValid(String beanAndMethodName, Class<?> clazz, Method method)
189189
+ "' does not support entryClass attribute of @ExtDirectMethod");
190190
}
191191

192-
if (extDirectMethodAnnotation.batched() == false) {
192+
if (!extDirectMethodAnnotation.batched()) {
193193
log.warn("FORM_POST method '" + beanAndMethodName
194194
+ "' does not support batched attribute of @ExtDirectMethod");
195195
}
@@ -237,7 +237,7 @@ else if (method.getReturnType().equals(Void.TYPE)) {
237237
if (methodAnnotation != null) {
238238
boolean hasPostRequestMethod = false;
239239
for (RequestMethod requestMethod : methodAnnotation.method()) {
240-
if (requestMethod.equals(RequestMethod.POST)) {
240+
if (RequestMethod.POST.equals(requestMethod)) {
241241
hasPostRequestMethod = true;
242242
break;
243243
}
@@ -253,7 +253,7 @@ else if (method.getReturnType().equals(Void.TYPE)) {
253253
ExtDirectMethod extDirectMethodAnnotation = AnnotatedElementUtils.findMergedAnnotation(method,
254254
ExtDirectMethod.class);
255255

256-
if (extDirectMethodAnnotation.batched() == false) {
256+
if (!extDirectMethodAnnotation.batched()) {
257257
log.warn("FORM_POST method '" + beanAndMethodName
258258
+ "' does not support batched attribute of @ExtDirectMethod");
259259
}
@@ -327,7 +327,7 @@ public boolean isValid(String beanAndMethodName, Class<?> clazz, Method method)
327327
+ "' does not support entryClass attribute of @ExtDirectMethod");
328328
}
329329

330-
if (extDirectMethodAnnotation.batched() == false) {
330+
if (!extDirectMethodAnnotation.batched()) {
331331
log.warn("POLL method '" + beanAndMethodName
332332
+ "' does not support batched attribute of @ExtDirectMethod");
333333
}
@@ -350,7 +350,7 @@ public boolean isValid(String beanAndMethodName, Class<?> clazz, Method method)
350350
+ "' does not support event attribute of @ExtDirectMethod");
351351
}
352352

353-
if (extDirectMethodAnnotation.batched() == false) {
353+
if (!extDirectMethodAnnotation.batched()) {
354354
log.warn("FORM_POST_JSON method '" + beanAndMethodName
355355
+ "' does not support batched attribute of @ExtDirectMethod");
356356
}
@@ -361,7 +361,7 @@ public boolean isValid(String beanAndMethodName, Class<?> clazz, Method method)
361361
+ "' must not have a BindingResult parameter");
362362
return false;
363363
}
364-
else if (clazzz.isAssignableFrom(MultipartFile.class)) {
364+
if (clazzz.isAssignableFrom(MultipartFile.class)) {
365365
log.error("FORM_POST_JSON method '" + beanAndMethodName
366366
+ "' must not have a MultipartFile parameter");
367367
return false;

src/main/java/ch/ralscha/extdirectspring/bean/DataType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public enum DataType {
2626

2727
private final String name;
2828

29-
private DataType(String name) {
29+
DataType(String name) {
3030
this.name = name;
3131
}
3232

src/main/java/ch/ralscha/extdirectspring/bean/EdJsonStoreResult.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import com.fasterxml.jackson.annotation.JsonInclude;
2525
import com.fasterxml.jackson.annotation.JsonInclude.Include;
2626
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
27+
2728
import tools.jackson.core.JsonGenerator;
2829
import tools.jackson.databind.SerializationContext;
2930
import tools.jackson.databind.ValueSerializer;

src/main/java/ch/ralscha/extdirectspring/bean/EdStoreResult.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import com.fasterxml.jackson.annotation.JsonInclude;
2626
import com.fasterxml.jackson.annotation.JsonInclude.Include;
2727
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
28+
2829
import tools.jackson.databind.annotation.JsonDeserialize;
2930
import tools.jackson.databind.annotation.JsonSerialize;
3031

src/main/java/ch/ralscha/extdirectspring/bean/ExtDirectRawJsonStoreResult.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*/
1616
package ch.ralscha.extdirectspring.bean;
1717

18-
import java.io.IOException;
1918
import java.util.Collection;
2019

2120
import tools.jackson.core.JsonGenerator;

src/main/java/ch/ralscha/extdirectspring/bean/ExtDirectResponse.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
*/
1616
package ch.ralscha.extdirectspring.bean;
1717

18-
import jakarta.servlet.http.HttpServletRequest;
19-
2018
import com.fasterxml.jackson.annotation.JsonIgnore;
2119
import com.fasterxml.jackson.annotation.JsonInclude;
2220
import com.fasterxml.jackson.annotation.JsonInclude.Include;
2321

22+
import jakarta.servlet.http.HttpServletRequest;
23+
2424
/**
2525
* Represents the response of a Ext Direct call. Internal class
2626
*/

src/main/java/ch/ralscha/extdirectspring/bean/ExtDirectResponseBuilder.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
import java.util.Locale;
2323
import java.util.Map;
2424

25-
import jakarta.servlet.http.HttpServletRequest;
26-
import jakarta.servlet.http.HttpServletResponse;
27-
2825
import org.apache.commons.logging.LogFactory;
2926
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
3027
import org.springframework.context.MessageSource;
@@ -37,6 +34,8 @@
3734
import ch.ralscha.extdirectspring.controller.Configuration;
3835
import ch.ralscha.extdirectspring.controller.RouterController;
3936
import ch.ralscha.extdirectspring.util.ExtDirectSpringUtil;
37+
import jakarta.servlet.http.HttpServletRequest;
38+
import jakarta.servlet.http.HttpServletResponse;
4039

4140
/**
4241
* An utility class that helps building the response for a FORM_POST method. The response

src/main/java/ch/ralscha/extdirectspring/bean/ImmutableEdJsonStoreResult.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
import com.fasterxml.jackson.annotation.JsonCreator;
2424
import com.fasterxml.jackson.annotation.JsonProperty;
25+
2526
import tools.jackson.databind.annotation.JsonSerialize;
2627

2728
public final class ImmutableEdJsonStoreResult extends EdJsonStoreResult {

src/main/java/ch/ralscha/extdirectspring/bean/ImmutableEdStoreResult.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ public static <T> ImmutableEdStoreResult<T> of(Collection<T> records, @Nullable
5757

5858
public static <T> ImmutableEdStoreResult<T> copyOf(EdStoreResult<T> instance) {
5959
if (instance instanceof ImmutableEdStoreResult<?> immutable) {
60-
@SuppressWarnings("unchecked")
61-
ImmutableEdStoreResult<T> cast = (ImmutableEdStoreResult<T>) immutable;
62-
return cast;
60+
return (ImmutableEdStoreResult<T>) immutable;
6361
}
6462
return new EdStoreResult.Builder<T>().from(instance).build();
6563
}

0 commit comments

Comments
 (0)