equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
42 |
42 |
43 void run() throws Exception { |
43 void run() throws Exception { |
44 // Test functions by comparing the version string from javac against |
44 // Test functions by comparing the version string from javac against |
45 // a "golden" version generated automatically from the underlying JVM. |
45 // a "golden" version generated automatically from the underlying JVM. |
46 // As such, it is only effective in testing the "standard" compiler, |
46 // As such, it is only effective in testing the "standard" compiler, |
47 // and not any development version being tested via -Xpatch. |
47 // and not any development version being tested via --patch-modules. |
48 // Check the version of the compiler being used, and let the test pass |
48 // Check the version of the compiler being used, and let the test pass |
49 // automatically if is is a development version. |
49 // automatically if is is a development version. |
50 Class<?> javacClass = com.sun.tools.javac.Main.class; |
50 Class<?> javacClass = com.sun.tools.javac.Main.class; |
51 URL location = javacClass.getProtectionDomain().getCodeSource().getLocation(); |
51 URL location = javacClass.getProtectionDomain().getCodeSource().getLocation(); |
52 if (!location.toString().equals("jrt:/jdk.compiler")) { |
52 if (!location.toString().equals("jrt:/jdk.compiler")) { |