diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 5a6823a..8e5a0a4 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -21,10 +21,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- - name: Set up JDK 21
+ - name: Set up JDK 17
uses: actions/setup-java@v4
with:
- java-version: '21'
+ java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 3d600d4..fcc92a2 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -14,10 +14,10 @@ jobs:
with:
fetch-depth: 0
- - name: Set up JDK 21
+ - name: Set up JDK 17
uses: actions/setup-java@v4
with:
- java-version: '21'
+ java-version: '17'
distribution: 'temurin'
cache: maven
diff --git a/README.md b/README.md
index 55a148b..0a7b9ca 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
-
+
@@ -104,7 +104,7 @@ Interested in contributing? Check out our [Contribution Guidelines](https://gith
### What you will need
* Git
-* Java 21 or higher
+* Java 17 or higher
### Get the Source Code
diff --git a/pom.xml b/pom.xml
index 908cb3a..76de252 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,7 +21,7 @@
- 21
+ 17
${java.version}
${java.version}
diff --git a/src/main/java/com/enofex/taikai/java/HashCodeAndEquals.java b/src/main/java/com/enofex/taikai/java/HashCodeAndEquals.java
index e573ead..081a876 100644
--- a/src/main/java/com/enofex/taikai/java/HashCodeAndEquals.java
+++ b/src/main/java/com/enofex/taikai/java/HashCodeAndEquals.java
@@ -38,7 +38,7 @@ private static boolean hasEquals(JavaClass javaClass) {
return javaClass.getMethods().stream()
.anyMatch(method -> "equals".equals(method.getName()) &&
method.getRawParameterTypes().size() == 1 &&
- method.getRawParameterTypes().getFirst().getName().equals(Object.class.getName()));
+ method.getRawParameterTypes().get(0).getName().equals(Object.class.getName()));
}
};
}
diff --git a/src/test/java/com/enofex/taikai/internal/ArchConditionsTest.java b/src/test/java/com/enofex/taikai/internal/ArchConditionsTest.java
index e252fe8..8810551 100644
--- a/src/test/java/com/enofex/taikai/internal/ArchConditionsTest.java
+++ b/src/test/java/com/enofex/taikai/internal/ArchConditionsTest.java
@@ -72,7 +72,7 @@ void shouldBePublicButNotStatic() {
verify(this.events).add(eventCaptor.capture());
assertEquals("Field %s in class %s is public".formatted(
this.mockField.getName(), this.mockClass.getFullName()),
- eventCaptor.getValue().getDescriptionLines().getFirst());
+ eventCaptor.getValue().getDescriptionLines().get(0));
}
@@ -102,7 +102,7 @@ void shouldNotHaveRequiredModifiers() {
this.mockField.getName(),
this.mockClass.getFullName(),
"PRIVATE, FINAL"),
- eventCaptor.getValue().getDescriptionLines().getFirst());
+ eventCaptor.getValue().getDescriptionLines().get(0));
}
@Test
diff --git a/src/test/java/com/enofex/taikai/internal/DescribedPredicatesTest.java b/src/test/java/com/enofex/taikai/internal/DescribedPredicatesTest.java
index a464cdb..114f6db 100644
--- a/src/test/java/com/enofex/taikai/internal/DescribedPredicatesTest.java
+++ b/src/test/java/com/enofex/taikai/internal/DescribedPredicatesTest.java
@@ -51,8 +51,8 @@ void shouldReturnTrueWhenAnnotatedWithAllAnnotations() {
void shouldReturnFalseWhenNotAnnotatedWithAllAnnotations() {
Set annotations = Set.of("MyAnnotation1", "MyAnnotation2");
- when(this.canBeAnnotated.isAnnotatedWith("MyAnnotation1")).thenReturn(false);
- when(this.canBeAnnotated.isAnnotatedWith("MyAnnotation2")).thenReturn(true);
+ when(this.canBeAnnotated.isAnnotatedWith("MyAnnotation1")).thenReturn(true);
+ when(this.canBeAnnotated.isAnnotatedWith("MyAnnotation2")).thenReturn(false);
assertFalse(DescribedPredicates.annotatedWithAll(annotations, false).test(this.canBeAnnotated));
}