Skip to content

Commit

Permalink
Fixing tests for java 21 + also test 11, 17 and 21 on win and linux
Browse files Browse the repository at this point in the history
  • Loading branch information
waschndolos committed Jan 9, 2024
1 parent 79c23b1 commit f0e2864
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 4 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@ buildPlugin(
useContainerAgent: true,
configurations: [
[platform: 'linux', jdk: 21],
[platform: 'windows', jdk: 21],
[platform: 'linux', jdk: 17],
[platform: 'windows', jdk: 17],
[platform: 'linux', jdk: 11],
[platform: 'windows', jdk: 11],
])
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ public void testCollectResult() throws Exception {

static void setFinalStaticTo123(Field field) throws Exception {
field.setAccessible(true);
Field modifiersField = Field.class.getDeclaredField("modifiers");
modifiersField.setAccessible(true);
modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL);
field.set(null, "123");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ private Node mockNode(String nodeName, boolean isOnline) {

static void setFinalStaticTo123(Field field) throws Exception {
field.setAccessible(true);
Field modifiersField = Field.class.getDeclaredField("modifiers");
modifiersField.setAccessible(true);
modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL);
field.set(null, "123");
}
}

0 comments on commit f0e2864

Please sign in to comment.