Skip to content

Commit

Permalink
Change Java Requirement from 21 to 17 for Broader Compatibility
Browse files Browse the repository at this point in the history
Closes gh-119
  • Loading branch information
mnhock committed Oct 27, 2024
1 parent a6e18a9 commit 36e7a1d
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<p align="center">
<img src="https://github.com/enofex/taikai/actions/workflows/maven.yml/badge.svg" />
<img src="https://img.shields.io/badge/Java%20Version-21-orange" />
<img src="https://img.shields.io/badge/Java%20Version-17-orange" />
<img height="20" src="https://sonarcloud.io/images/project_badges/sonarcloud-orange.svg">
</p>

Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</description>

<properties>
<java.version>21</java.version>
<java.version>17</java.version>

<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
}
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}


Expand Down Expand Up @@ -102,7 +102,7 @@ void shouldNotHaveRequiredModifiers() {
this.mockField.getName(),
this.mockClass.getFullName(),
"PRIVATE, FINAL"),
eventCaptor.getValue().getDescriptionLines().getFirst());
eventCaptor.getValue().getDescriptionLines().get(0));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ void shouldReturnTrueWhenAnnotatedWithAllAnnotations() {
void shouldReturnFalseWhenNotAnnotatedWithAllAnnotations() {
Set<String> 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));
}
Expand Down

0 comments on commit 36e7a1d

Please sign in to comment.