Skip to content

Commit a44a1f8

Browse files
committed
Fixed ant task tests broken by increaded --release target version
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
1 parent dae675b commit a44a1f8

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

jaxws-ri/tools/wscompile/src/test/java/com/sun/tools/ws/test/ant/WsGenTaskTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) 2026 Contributors to the Eclipse Foundation.
23
* Copyright (c) 2011, 2022 Oracle and/or its affiliates. All rights reserved.
34
*
45
* This program and the accompanying materials are made available under the
@@ -15,8 +16,6 @@
1516
import java.io.FileInputStream;
1617
import java.io.IOException;
1718
import java.net.URISyntaxException;
18-
import java.util.List;
19-
import java.util.logging.Logger;
2019

2120
/**
2221
*
@@ -90,13 +89,13 @@ public void testJavac() throws IOException, URISyntaxException {
9089
DataInputStream in = new DataInputStream(new FileInputStream(f));
9190
assertEquals(0xcafebabe, in.readInt());
9291
assertEquals(0, in.readUnsignedShort());
93-
assertEquals(52, in.readUnsignedShort());
92+
assertEquals(55, in.readUnsignedShort());
9493

9594
//ws class is compiled by default javac (6+)
9695
f = new File(srcDir, "test/TestWs.class");
9796
in = new DataInputStream(new FileInputStream(f));
9897
assertEquals(0xcafebabe, in.readInt());
9998
in.readUnsignedShort();
100-
assertTrue(52 != in.readUnsignedShort());
99+
assertTrue(55 != in.readUnsignedShort());
101100
}
102101
}

jaxws-ri/tools/wscompile/src/test/java/com/sun/tools/ws/test/ant/WsImportTaskTest.java

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) 2026 Contributors to the Eclipse Foundation.
23
* Copyright (c) 2011, 2022 Oracle and/or its affiliates. All rights reserved.
34
*
45
* This program and the accompanying materials are made available under the
@@ -10,10 +11,13 @@
1011

1112
package com.sun.tools.ws.test.ant;
1213

13-
import java.io.*;
14-
import java.net.URISyntaxException;
15-
import java.util.List;
16-
import java.util.logging.Logger;
14+
import java.io.BufferedReader;
15+
import java.io.DataInputStream;
16+
import java.io.File;
17+
import java.io.FileInputStream;
18+
import java.io.FileNotFoundException;
19+
import java.io.FileReader;
20+
import java.io.IOException;
1721

1822
/**
1923
*
@@ -24,7 +28,7 @@ public class WsImportTaskTest extends WsAntTaskTestBase {
2428
private File wsdl;
2529
private File pkg;
2630
private File metainf;
27-
31+
2832
@Override
2933
public String getBuildScript() {
3034
return "wsimport.xml";
@@ -104,13 +108,13 @@ public void testJavac() throws IOException {
104108
DataInputStream in = new DataInputStream(new FileInputStream(f));
105109
assertEquals(0xcafebabe, in.readInt());
106110
assertEquals(0, in.readUnsignedShort());
107-
assertEquals(52, in.readUnsignedShort());
111+
assertEquals(55, in.readUnsignedShort());
108112

109113
f = new File(buildDir, "test/Hello.class");
110114
in = new DataInputStream(new FileInputStream(f));
111115
assertEquals(0xcafebabe, in.readInt());
112116
assertEquals(0, in.readUnsignedShort());
113-
assertEquals(52, in.readUnsignedShort());
117+
assertEquals(55, in.readUnsignedShort());
114118
}
115119

116120
}

0 commit comments

Comments
 (0)