Skip to content

Commit

Permalink
Merge pull request apache#7635 from mbien/parse-java-version-fix_deli…
Browse files Browse the repository at this point in the history
…very

truffle.RemoteServices should parse the java version correctly
  • Loading branch information
ebarboni authored Aug 7, 2024
2 parents be2a72c + 5f63648 commit 3134074
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion java/debugger.jpda.truffle/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# under the License.

javac.compilerargs=-Xlint:unchecked
javac.source=1.8
javac.release=11
javadoc.arch=${basedir}/arch.xml
nbm.module.author=Martin Entlicher
requires.nb.javac=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,7 @@ private static ObjectReference getContextClassLoader(ThreadReference tawt, Virtu

private static int getTargetMajorVersion(VirtualMachine vm) throws InternalExceptionWrapper, VMDisconnectedExceptionWrapper {
String version = VirtualMachineWrapper.version(vm);
int dot = version.indexOf(".");
if (dot < 0) {
dot = version.length();
}
return Integer.parseInt(version.substring(0, dot));
return Runtime.Version.parse(version).feature();
}

public static ClassObjectReference uploadBasicClasses(JPDAThreadImpl t, String basicClassName) throws InvalidTypeException, ClassNotLoadedException, IncompatibleThreadStateException, InvocationException, IOException, PropertyVetoException, InternalExceptionWrapper, VMDisconnectedExceptionWrapper, ObjectCollectedExceptionWrapper, UnsupportedOperationExceptionWrapper, ClassNotPreparedExceptionWrapper {
Expand Down

0 comments on commit 3134074

Please sign in to comment.