Skip to content

Commit fd77fdf

Browse files
author
Vincent Potucek
committed
1 parent 39dc2eb commit fd77fdf

File tree

213 files changed

+362
-370
lines changed

Some content is hidden

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

213 files changed

+362
-370
lines changed

documentation/src/main/java/example/domain/Person.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,8 @@ public LocalDate getDateOfBirth() {
5454
public int hashCode() {
5555
final int prime = 31;
5656
int result = 1;
57-
result = prime * result + ((firstName == null) ? 0 : firstName.hashCode());
58-
result = prime * result + ((lastName == null) ? 0 : lastName.hashCode());
59-
return result;
57+
result = prime * result + (firstName == null ? 0 : firstName.hashCode());
58+
return prime * result + (lastName == null ? 0 : lastName.hashCode());
6059
}
6160

6261
@Override

documentation/src/main/java/example/util/StringUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
import org.jspecify.annotations.Nullable;
1616

17-
public class StringUtils {
17+
public final class StringUtils {
1818

1919
public static boolean isPalindrome(@Nullable String candidate) {
2020
int length = requireNonNull(candidate).length();

documentation/src/tools/java/org/junit/api/tools/ApiReportGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
/**
4747
* @since 1.0
4848
*/
49-
class ApiReportGenerator {
49+
final class ApiReportGenerator {
5050

5151
private static final Logger LOGGER = LoggerFactory.getLogger(ApiReportGenerator.class);
5252
private static final String EOL = System.lineSeparator();

gradle/config/rewrite.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ tags:
1010
- cleanup
1111
recipeList:
1212
- org.openrewrite.java.testing.junit.JupiterBestPractices
13-
# - org.openrewrite.staticanalysis.CommonStaticAnalysis
13+
- org.openrewrite.staticanalysis.CommonStaticAnalysis
1414
---

junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertAll.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*
2929
* @since 5.0
3030
*/
31-
class AssertAll {
31+
final class AssertAll {
3232

3333
private AssertAll() {
3434
/* no-op */

junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertArrayEquals.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*
2929
* @since 5.0
3030
*/
31-
class AssertArrayEquals {
31+
final class AssertArrayEquals {
3232

3333
private AssertArrayEquals() {
3434
/* no-op */
@@ -523,7 +523,7 @@ private static void failArraysNotEqual(@Nullable Object expected, @Nullable Obje
523523
}
524524

525525
private static Deque<Integer> nullSafeIndexes(@Nullable Deque<Integer> indexes, int newIndex) {
526-
Deque<Integer> result = (indexes != null ? indexes : new ArrayDeque<>());
526+
Deque<Integer> result = indexes != null ? indexes : new ArrayDeque<>();
527527
result.addLast(newIndex);
528528
return result;
529529
}

junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertDoesNotThrow.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*
3030
* @since 5.2
3131
*/
32-
class AssertDoesNotThrow {
32+
final class AssertDoesNotThrow {
3333

3434
private AssertDoesNotThrow() {
3535
/* no-op */

junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertEquals.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*
2626
* @since 5.0
2727
*/
28-
class AssertEquals {
28+
final class AssertEquals {
2929

3030
private AssertEquals() {
3131
/* no-op */

junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertFalse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*
2525
* @since 5.0
2626
*/
27-
class AssertFalse {
27+
final class AssertFalse {
2828

2929
private AssertFalse() {
3030
/* no-op */

junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertInstanceOf.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*
2525
* @since 5.8
2626
*/
27-
class AssertInstanceOf {
27+
final class AssertInstanceOf {
2828

2929
private AssertInstanceOf() {
3030
/* no-op */

0 commit comments

Comments
 (0)