Skip to content

Commit

Permalink
fix(sonar): correct sonar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
THOREL Arnaud authored and THOREL Arnaud committed Nov 15, 2023
1 parent f73f0c5 commit 870b907
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class FilterFieldConstraintException extends RuntimeException {
/**
* List of violations
*/
private final List<FilterFieldViolation> violations;
private final transient List<FilterFieldViolation> violations;
/**
* Class of the bean scanned
*/
Expand Down
3 changes: 3 additions & 0 deletions src/test/java/fr/ouestfrance/querydsl/dummy/DummyRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,7 @@ public class DummyRequest {

@FilterField
private boolean valid;

private String noFilterField;
}

Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ void shouldTranslate() {
object.setValidityDate(LocalDate.of(2023, 12, 12));
object.setValid(true);
List<String> translate = translatorService.process(object);
System.out.println(translate);
assertEquals(4, translate.size());
assertLinesMatch(List.of("productCode=25", "startDate=2023-12-12", "endDate=2023-12-12", "valid=true"), translate);
}

@Test
void shouldTranslateWithNullValue() {
List<String> translate = translatorService.process(null);
assertEquals(0, translate.size());
}
}

0 comments on commit 870b907

Please sign in to comment.