Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support building and running on JDK 22 #1419

Merged
merged 5 commits into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
java: 17
- os: ubuntu-latest
java: 21
- os: ubuntu-latest
java: 22
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ public void testList()
.filter(s -> s instanceof NormalStatement && s.getNode().equals(main))
.collect(Collectors.toList());
normalsInMain.stream().forEach(System.err::println);
assertEquals(7, normalsInMain.size());
assertEquals(5, normalsInMain.size());
}

@Test
Expand Down
6 changes: 3 additions & 3 deletions core/src/testSubjects/java/slice/TestList.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ public class TestList {
static void doNothing(Object o) {}

public static void main(String[] args) {
List<Integer> list = new ArrayList<>();
List<String> list = new ArrayList<>();

list.add(2);
list.add(3);
list.add("hi");
list.add("bye");
liblit marked this conversation as resolved.
Show resolved Hide resolved

doNothing(list.get(0));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ private void parse() throws InvalidClassFileException {
if (magic != MAGIC) {
throw new InvalidClassFileException(offset, "bad magic number: " + magic);
}
// Support class files up through JDK 21 (version 65)
if (majorVersion < 45 || majorVersion > 65) {
// Support class files up through JDK 22 (version 66)
if (majorVersion < 45 || majorVersion > 66) {
throw new InvalidClassFileException(
offset, "unknown class file version: " + majorVersion + '.' + minorVersion);
}
Expand Down
Loading